package com.zzld.modules.autoinn.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zzld.core.service.BaseServiceImpl;
import com.zzld.modules.autoinn.entity.Recharge;
import com.zzld.modules.autoinn.mapper.RechargeMapper;
import com.zzld.modules.autoinn.service.IRechargeService;

@Service("rechargeService")
public class RechargeServiceImpl extends BaseServiceImpl<Recharge> implements IRechargeService  {

	@Autowired
	private RechargeMapper rechargeMapper;
	
	public PageInfo list(Map map,int pageNum,int pageSize){
		Map<String,Object> maps = map;
		PageHelper.startPage(pageNum, pageSize);
		List<Recharge> lista = rechargeMapper.selectpa(maps);
	
	
		PageInfo page = new PageInfo(lista);
		return page;
	}
	
	public List<Recharge> selectall(Map map){   
		try{
			return rechargeMapper.selectpa(map);
		}catch(Exception e){
			e.printStackTrace();
		}
		return null;
	}
	
	public List<Recharge> selectbyrecha(Map<String,Object> map){
		try{
			return rechargeMapper.selectbyrecha(map);
		}catch(Exception e){
			e.printStackTrace();
		}
		return null;
	}
}
